<template>
  <div>
    <link rel="stylesheet" href="@/assets/fonts/iconfont.css" />
    <!-- 头部黑色头部开始 -->
    <div class="top_black">
      <div class="container">
        <div class="topBlack_left">
          <a href="#" target="_blank" class="top_off_web">OPPO 官网</a>
          <a href="#" target="_blank" class="top_off_web">一加官网</a>
        </div>
        <div class="topBlack_Right">
          <a href="javascript:;"><span>下载 OPPO 商城 App</span> </a>
          <a @click="ToLoginPage">
            <user-outlined style="font-size: 16px; margin-right: 10px" />
            <span>登录</span>
          </a>
          <a href="javascript:;"><em></em><span>注册</span> </a>
          <a @click="shopping()">

            <em></em><i class="iconfont icon-31gouwuche"></i

            ><span >购物车</span> <span>（{{isCount}}）</span></a>
        </div>
      </div>
    </div>
    <!-- 头部黑色头部结束 -->
    <!-- 头部首页导航开始 -->
    <div class="top_nav_white">
      <!-- Logo -->
      <div class="logo-top">
        <a href="javascript:;">
          <img src="@/assets/images/oppologo.png" alt="" height="50" />
        </a>
      </div>
      <!-- 头部导航跳转 -->
      <div class="topic-wrap">
        <div class="top-wrap-text">
          <a href="javascript:;" target="_blank">OPPO专区</a>
        </div>
        <div class="top-wrap-text">
          <a href="javascript:;" target="_blank">OnePlus服务</a>
        </div>
        <div class="top-wrap-text">
          <a href="javascript:;" target="_blank">智能硬件</a>
        </div>
        <div class="top-wrap-text">
          <a @click="serve()" target="_blank" >服务</a>
        </div>
      </div>
      <!-- 头部导航搜索表单 -->
      <div class="nav-search">
        <input
          type=""
          name=""
          class="top-nav-ipt"
          placeholder="OPPO Reno8"
          value=""
        />
        <img
          src="@/assets/svg/搜索黑.svg"
          height="16px"
          width="16px
        "
          alt=""
        />
        <!-- <i class="iconfont icon-sousuo3"></i> -->
      </div>
    </div>
    <!-- 头部首页导航结束 -->
  </div>
</template>

<script>
import { UserOutlined } from '@ant-design/icons-vue'

export default {
  data() {
    return {
      isCount: ''
    }
  },
  methods: {
    shopping() {
      this.$router.push({
        name: 'shoppingcart'
      })
    },
    serve () {
      this.$router.push('/serve')
    }
  },
  components: {
    UserOutlined
  }
}
</script>

<style lang="scss">
.top_black {
  height: 36px;
  background-color: #222;
  display: flex;
  justify-content: center;
}

.container {
  /* background-color: pink; */
  width: 68%;
  /* height: 36px; */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topBlack_left {
  /* background-color: red; */
  display: flex;
  justify-content: center;
  align-items: center;
  /* width: 200px; */
  /* width: 10%; */
  /* height: 36px; */
  color: #fff;
  font-size: 12px;
  color: #fff;
}

.topBlack_Right {
  display: flex;
  justify-content: space-around;
  align-items: center;
  /* background-color: blue; */
  height: 14px;
  line-height: 14px;
  /* width: 200px; */
  /* height: 100%; */
}

.topBlack_Right a:nth-of-type(n + 2) {
  border-left: #fff 1px solid;
}

.topBlack_Right i {
  font-style: 16px;
  margin-right: 4px;
  /* margin-top: 5px; */
  font-size: inherit;
  text-rendering: auto;
  line-height: inherit;
}

.top_off_web {
  margin-right: 18px;
}

.topBlack_Right a {
  padding: 0 14px 0;
}

.top_black .container a {
  color: #fff;
}

.top_black .container a:hover {
  color: #fff;
}

/* 头部白色导航栏目 */
.top_nav_white {
  width: 68%;
  height: 84px;
  background-color: #fff;
  margin: auto;
  display: flex;
  align-items: center;
}

.logo-top {
  width: 250px;
  height: 50px;
}

.topic-wrap {
  display: flex;
  justify-content: space-around;
  width: 530px;
  font-size: 14px;
}

.topic-wrap .top-wrap-text a {
  color: #858585;
}

.topic-wrap .top-wrap-text a:hover {
  /* color: #858585; */
  color: rgba(0, 0, 0, 0.87);
  font-weight: 500;
  /* font-weight: 700; */
}

.nav-search {
  display: flex;
  padding: 8px 16px;
  background-color: rgba(238, 238, 238, 0.5);
  color: rgba(0, 0, 0, 0.87);
  font-size: 16px;
  /* border: radius 16px; */
  border-radius: 19px;
  justify-content: center;
  align-items: center;
  outline: none;
}

.top-nav-ipt {
  font-size: 14px;
  height: 21px;
  width: 114px;
  background-color: rgba(0, 0, 0, 0);
  /* color: rgba(238, 238, 238, 0.5) */
  border: 1px solid #f6f6f6;
}

.nav-search .icon-sousuo3 {
  font-size: 14px;
  font-weight: 700;
}
</style>
